package j05autoclose;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class J2char {
    public static void main(String[] args) throws Exception {
        FileReader fr = new FileReader("_0905/src/j05autoclose/1.txt");
        System.out.println((char) fr.read());
        System.out.println((char)fr.read());
        System.out.println(fr.read());

        System.out.println(fr.read());
        System.out.println(fr.read());

    }
}

class J3writer{
    public static void main(String[] args) throws Exception {
        FileWriter fw = new FileWriter("_0905/src/j05autoclose/1.txt",true);
//        fw.write("林冲");
//        fw.write("武松");
        fw.write(new char[]{97,98});
        fw.close();

    }
}
